/*
 * To change this license header, choose License Headers in Project Properties.
 * To change this template file, choose Tools | Templates
 * and open the template in the editor.
 */
package edu.fjs.liyq.dao;

import edu.fjs.liyq.entity.Product;
import java.util.List;

/**
 *
 * @author danny
 */
public interface ProductDao {
    /**
     * 分页查询商品
     * 
     * @param pageNum   页码数
     * @param rowCount  每页数据条数
     * @return 
     */
    List<Product> selectPage(int pageNum, int rowCount);
    
    /**
     * 查询商品总条数
     * 
     * @return 
     */
    int selectCount();
    
    /**
     * 添加商品
     * @param product
     * @return 
     */
    int insert(Product product);
    
    /**
     * 
     * @param prodId
     * @return 
     */
    Product select(long prodId);
    
    /**
     * 
     * @param product
     * @return 
     */
    int update(Product product);
}
